<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>News - <?php echo $webname; ?></title>
<meta name="keywords" content="News,<?php echo $webname; ?>" />
<meta name="description" content="News,<?php echo $webname; ?>" />
<link href="<?php echo $skindir; ?>images/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<?php include('include/header.tpl.php'); ?>
<div id="page">
<?php include('include/weblogo.tpl.php'); ?>
	<div id="content">
    	<p class="fr"><a href="#bot">Bottom</a></p>
<?php foreach($newss as $news): ?>
		<div class="post">
			<h2 class="title"><a href="<?php echo $sitedir; ?>news.php/<?php echo $news['pnode'];?>"><?php echo $news['title'];?></a></h2>
			<p class="meta"><em>{ Posted by <?php echo $news['author'];?> on <?php echo $news['pubtime']; ?> }</em></p>
			<div class="entry">
				<p><?php echo nl2br($news['intro']);?></p>
				<p class="links"><a href="<?php echo $sitedir; ?>news.php/<?php echo $news['pnode'];?>" class="permalink">Full article</a></p>
			</div>
		</div>
<?php endforeach; ?>
		<div class="post">
			<h2 class="title"></h2>
			<p class="meta"><em>{ Page <?php echo $pagenum .'/'. $pagecnt; ?> , total <?php echo $total; ?> }</em></p>
            <p class="fr"><a href="#top" class="permalink">Top</a></p>
			<div class="entry">
				<p class="links">
<?php if($pagenum > 1): ?>
					<a href="<?php echo $sitedir; ?>news.php?pn=1" class="permalink">First</a>
					<a href="<?php echo $sitedir; ?>news.php?pn=<?php echo $pagenum-1; ?>" class="permalink">Prev</a>
<?php else: ?>
					<span class="permalink">First</span>
                    <span class="permalink">Prev</span>
<?php endif; ?>
<?php
for($page=$pagestart; $page<=$pageend; $page++):
	if($pagenum == $page):
?>
					<span class="permalink"><?php echo $page; ?></span>
<?php else: ?>
					<a href="<?php echo $sitedir; ?>news.php?pn=<?php echo $page; ?>" class="permalink"><?php echo $page; ?></a>
<?php
	endif; 
endfor;
?>
<?php if($pagenum < $pagecnt): ?>
					<a href="<?php echo $sitedir; ?>news.php?pn=<?php echo $pagenum+1; ?>" class="permalink">Next</a>
					<a href="<?php echo $sitedir; ?>news.php?pn=<?php echo $pagecnt; ?>" class="permalink">Last</a>
<?php else: ?>
					<span class="permalink">Next</span>
					<span class="permalink">Last</span>
<?php endif; ?>
				</p>
			</div>
		</div>
	</div>
	<!-- end #content -->
<?php include('include/sidebar.tpl.php'); ?>
	<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #page -->
<?php include('include/footer.tpl.php'); ?>
</body>
</html>
